#ifndef NOTIFICATION_DIALOG_H
#define NOTIFICATION_DIALOG_H

#include <QDialog>
#include <QStandardItemModel>
#include <QItemSelectionModel>
#include <QMessageBox>
#include <QSqlDatabase>
#include <QSqlQuery>
#include <QSqlError>
#include "ui_NotificationDialog.h"

class NotificationDialog : public QDialog
{
    Q_OBJECT

public:
    explicit NotificationDialog(const QString& username, QWidget *parent = nullptr);
    ~NotificationDialog();

private slots:
    void on_MarkAsReadBtn_clicked();
    void on_DeleteBtn_clicked();
    void on_TypecomboBox_currentIndexChanged(int index);
    void on_IfReadComboBox_currentIndexChanged(int index);

private:
    Ui::viewNotification *ui;
    QString m_username;
    QStandardItemModel* m_model;

    void refreshNotifications();
    void initTypeComboBox();
    void setupModel();

    // Utility methods for notification operations
    bool markNotificationAsRead(int notificationId);
    bool deleteNotification(int notificationId);
    QString getNotificationTypeDisplayName(const QString& type);
};

#endif // NOTIFICATION_DIALOG_H
